{% extends 'base.html' %}
{% block title %}
<title>登录</title>
{% endblock %}
{% block body %}
            <div class="row">
                <div class="col-sm-6 col-sm-offset-3">
                    <form action="" method="post">
                       {% csrf_token %}
                      <div class="form-group">
                        <label for="exampleInputEmail1">用户名</label>
                        <input  name = 'username' type="text" class="form-control" id="exampleInputEmail1" placeholder="用户名">
                      </div>
                      <div class="form-group">
                        <label for="exampleInputPassword1">密码</label>
                        <input name = 'password' type="password" class="form-control" id="exampleInputPassword1" placeholder="密码">
                      </div>
                      <div class="form-group">
                        <label for="exampleInputPassword2">确认密码</label>
                        <input name = 'password2' type="password" class="form-control" id="exampleInputPassword2" placeholder="确认密码">
                      </div>
                        {% if error %}
                        <div class="form-group">
                            <p class="text-danger">{{ error }}</p>
                        </div>
                        {% endif %}
                      <button type="submit" class="btn btn-default">注册</button>
                      <button type="button" class="btn btn-default navbar-btn"><a href="/user/login/">去登录</a></button>
                    </form>


                </div>
            </div>

{% endblock %}